package com.iplay.java8简明指南;

import cn.hutool.core.lang.copier.Copier;

/**
 * @author dangwu
 * @since 2021/10/13 4:22 下午
 */
public class Test {
    public static void main(String[] args) {
        Converter<String, Integer> lineHandler = Integer::valueOf;
        Integer convert = lineHandler.convert("1111");
        System.out.println(convert);
        Converter<String, Integer> converter = (from) -> Integer.valueOf(from);
        Integer converted = converter.convert("123");
        System.out.println(converted);    // 123
        Copier<Person> personCopier = Person::new;
        Person copy = personCopier.copy();

        PersonFactory<Person> personFactory = Person::new;
        Person qwe = personFactory.create("123", "qwe");


        //====================
    }
}
